(0) Obligation:

Clauses:

slowsort(X, Y) :- ','(perm(X, Y), sorted(Y)).
sorted([]).
sorted(.(X, [])).
sorted(.(X, .(Y, Z))) :- ','(le(X, Y), sorted(.(Y, Z))).
perm([], []).
perm(.(X, .(Y, [])), .(U, .(V, []))) :- ','(delete(U, .(X, Y), Z), perm(Z, V)).
delete(X, .(X, Y), Y).
delete(X, .(Y, Z), W) :- delete(X, Z, W).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(X)).
le(0, 0).

Query: slowsort(g,a)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

deleteA(X1, .(X2, X3), X4) :- deleteA(X1, X3, X4).
deleteB(X1, X2, X3, X4) :- deleteA(X1, X3, X4).
permC(.(X1, .(X2, [])), .(X3, .(X4, []))) :- deleteB(X3, X1, X2, X5).
permC(.(X1, .(X2, [])), .(X3, .(X4, []))) :- ','(deletecB(X3, X1, X2, X5), permC(X5, X4)).
leD(s(X1), s(X2)) :- leD(X1, X2).
slowsortE(.(X1, .(X2, [])), .(X3, .(X4, []))) :- deleteB(X3, X1, X2, X5).
slowsortE(.(X1, .(X2, [])), .(X3, .(X4, []))) :- ','(deletecB(X3, X1, X2, X5), permC(X5, X4)).
slowsortE(.(X1, .(X2, [])), .(X3, .(X4, []))) :- ','(deletecB(X3, X1, X2, X5), ','(permcC(X5, X4), leD(X3, X4))).

Clauses:

deletecA(X1, .(X1, X2), X2).
deletecA(X1, .(X2, X3), X4) :- deletecA(X1, X3, X4).
deletecB(X1, X1, X2, X2).
deletecB(X1, X2, X3, X4) :- deletecA(X1, X3, X4).
permcC([], []).
permcC(.(X1, .(X2, [])), .(X3, .(X4, []))) :- ','(deletecB(X3, X1, X2, X5), permcC(X5, X4)).
lecD(s(X1), s(X2)) :- lecD(X1, X2).
lecD(0, s(X1)).
lecD(0, 0).

Afs:

slowsortE(x1, x2)  =  slowsortE(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
slowsortE_in: (b,f)
deleteB_in: (f,b,b,f)
deleteA_in: (f,b,f)
deletecB_in: (f,b,b,f)
deletecA_in: (f,b,f)
permC_in: (b,f)
permcC_in: (b,f)
leD_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U7_GA(X1, X2, X3, X4, deleteB_in_agga(X3, X1, X2, X5))
SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → DELETEB_IN_AGGA(X3, X1, X2, X5)
DELETEB_IN_AGGA(X1, X2, X3, X4) → U2_AGGA(X1, X2, X3, X4, deleteA_in_aga(X1, X3, X4))
DELETEB_IN_AGGA(X1, X2, X3, X4) → DELETEA_IN_AGA(X1, X3, X4)
DELETEA_IN_AGA(X1, .(X2, X3), X4) → U1_AGA(X1, X2, X3, X4, deleteA_in_aga(X1, X3, X4))
DELETEA_IN_AGA(X1, .(X2, X3), X4) → DELETEA_IN_AGA(X1, X3, X4)
SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U8_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U9_GA(X1, X2, X3, X4, permC_in_ga(X5, X4))
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U3_GA(X1, X2, X3, X4, deleteB_in_agga(X3, X1, X2, X5))
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → DELETEB_IN_AGGA(X3, X1, X2, X5)
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U4_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U5_GA(X1, X2, X3, X4, permC_in_ga(X5, X4))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U10_GA(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U10_GA(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → U11_GA(X1, X2, X3, X4, leD_in_gg(X3, X4))
U10_GA(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → LED_IN_GG(X3, X4)
LED_IN_GG(s(X1), s(X2)) → U6_GG(X1, X2, leD_in_gg(X1, X2))
LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
permcC_in_ga([], []) → permcC_out_ga([], [])
permcC_in_ga(.(X1, .(X2, [])), .(X3, .(X4, []))) → U15_ga(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U15_ga(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U16_ga(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U16_ga(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → permcC_out_ga(.(X1, .(X2, [])), .(X3, .(X4, [])))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deleteB_in_agga(x1, x2, x3, x4)  =  deleteB_in_agga(x2, x3)
deleteA_in_aga(x1, x2, x3)  =  deleteA_in_aga(x2)
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
permC_in_ga(x1, x2)  =  permC_in_ga(x1)
permcC_in_ga(x1, x2)  =  permcC_in_ga(x1)
permcC_out_ga(x1, x2)  =  permcC_out_ga(x1, x2)
U15_ga(x1, x2, x3, x4, x5)  =  U15_ga(x1, x2, x5)
U16_ga(x1, x2, x3, x4, x5)  =  U16_ga(x1, x2, x3, x5)
leD_in_gg(x1, x2)  =  leD_in_gg(x1, x2)
s(x1)  =  s(x1)
SLOWSORTE_IN_GA(x1, x2)  =  SLOWSORTE_IN_GA(x1)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x2, x5)
DELETEB_IN_AGGA(x1, x2, x3, x4)  =  DELETEB_IN_AGGA(x2, x3)
U2_AGGA(x1, x2, x3, x4, x5)  =  U2_AGGA(x2, x3, x5)
DELETEA_IN_AGA(x1, x2, x3)  =  DELETEA_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x2, x3, x5)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x5)
PERMC_IN_GA(x1, x2)  =  PERMC_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x5)
U5_GA(x1, x2, x3, x4, x5)  =  U5_GA(x1, x2, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x1, x2, x5)
LED_IN_GG(x1, x2)  =  LED_IN_GG(x1, x2)
U6_GG(x1, x2, x3)  =  U6_GG(x1, x2, x3)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U7_GA(X1, X2, X3, X4, deleteB_in_agga(X3, X1, X2, X5))
SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → DELETEB_IN_AGGA(X3, X1, X2, X5)
DELETEB_IN_AGGA(X1, X2, X3, X4) → U2_AGGA(X1, X2, X3, X4, deleteA_in_aga(X1, X3, X4))
DELETEB_IN_AGGA(X1, X2, X3, X4) → DELETEA_IN_AGA(X1, X3, X4)
DELETEA_IN_AGA(X1, .(X2, X3), X4) → U1_AGA(X1, X2, X3, X4, deleteA_in_aga(X1, X3, X4))
DELETEA_IN_AGA(X1, .(X2, X3), X4) → DELETEA_IN_AGA(X1, X3, X4)
SLOWSORTE_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U8_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U9_GA(X1, X2, X3, X4, permC_in_ga(X5, X4))
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U3_GA(X1, X2, X3, X4, deleteB_in_agga(X3, X1, X2, X5))
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → DELETEB_IN_AGGA(X3, X1, X2, X5)
PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U4_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U5_GA(X1, X2, X3, X4, permC_in_ga(X5, X4))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)
U8_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U10_GA(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U10_GA(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → U11_GA(X1, X2, X3, X4, leD_in_gg(X3, X4))
U10_GA(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → LED_IN_GG(X3, X4)
LED_IN_GG(s(X1), s(X2)) → U6_GG(X1, X2, leD_in_gg(X1, X2))
LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
permcC_in_ga([], []) → permcC_out_ga([], [])
permcC_in_ga(.(X1, .(X2, [])), .(X3, .(X4, []))) → U15_ga(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U15_ga(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U16_ga(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U16_ga(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → permcC_out_ga(.(X1, .(X2, [])), .(X3, .(X4, [])))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deleteB_in_agga(x1, x2, x3, x4)  =  deleteB_in_agga(x2, x3)
deleteA_in_aga(x1, x2, x3)  =  deleteA_in_aga(x2)
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
permC_in_ga(x1, x2)  =  permC_in_ga(x1)
permcC_in_ga(x1, x2)  =  permcC_in_ga(x1)
permcC_out_ga(x1, x2)  =  permcC_out_ga(x1, x2)
U15_ga(x1, x2, x3, x4, x5)  =  U15_ga(x1, x2, x5)
U16_ga(x1, x2, x3, x4, x5)  =  U16_ga(x1, x2, x3, x5)
leD_in_gg(x1, x2)  =  leD_in_gg(x1, x2)
s(x1)  =  s(x1)
SLOWSORTE_IN_GA(x1, x2)  =  SLOWSORTE_IN_GA(x1)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x1, x2, x5)
DELETEB_IN_AGGA(x1, x2, x3, x4)  =  DELETEB_IN_AGGA(x2, x3)
U2_AGGA(x1, x2, x3, x4, x5)  =  U2_AGGA(x2, x3, x5)
DELETEA_IN_AGA(x1, x2, x3)  =  DELETEA_IN_AGA(x2)
U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x2, x3, x5)
U8_GA(x1, x2, x3, x4, x5)  =  U8_GA(x1, x2, x5)
U9_GA(x1, x2, x3, x4, x5)  =  U9_GA(x1, x2, x5)
PERMC_IN_GA(x1, x2)  =  PERMC_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x5)
U5_GA(x1, x2, x3, x4, x5)  =  U5_GA(x1, x2, x5)
U10_GA(x1, x2, x3, x4, x5)  =  U10_GA(x1, x2, x3, x5)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x1, x2, x5)
LED_IN_GG(x1, x2)  =  LED_IN_GG(x1, x2)
U6_GG(x1, x2, x3)  =  U6_GG(x1, x2, x3)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 15 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
permcC_in_ga([], []) → permcC_out_ga([], [])
permcC_in_ga(.(X1, .(X2, [])), .(X3, .(X4, []))) → U15_ga(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U15_ga(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U16_ga(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U16_ga(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → permcC_out_ga(.(X1, .(X2, [])), .(X3, .(X4, [])))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
permcC_in_ga(x1, x2)  =  permcC_in_ga(x1)
permcC_out_ga(x1, x2)  =  permcC_out_ga(x1, x2)
U15_ga(x1, x2, x3, x4, x5)  =  U15_ga(x1, x2, x5)
U16_ga(x1, x2, x3, x4, x5)  =  U16_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
LED_IN_GG(x1, x2)  =  LED_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LED_IN_GG(s(X1), s(X2)) → LED_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELETEA_IN_AGA(X1, .(X2, X3), X4) → DELETEA_IN_AGA(X1, X3, X4)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
permcC_in_ga([], []) → permcC_out_ga([], [])
permcC_in_ga(.(X1, .(X2, [])), .(X3, .(X4, []))) → U15_ga(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U15_ga(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U16_ga(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U16_ga(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → permcC_out_ga(.(X1, .(X2, [])), .(X3, .(X4, [])))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
permcC_in_ga(x1, x2)  =  permcC_in_ga(x1)
permcC_out_ga(x1, x2)  =  permcC_out_ga(x1, x2)
U15_ga(x1, x2, x3, x4, x5)  =  U15_ga(x1, x2, x5)
U16_ga(x1, x2, x3, x4, x5)  =  U16_ga(x1, x2, x3, x5)
DELETEA_IN_AGA(x1, x2, x3)  =  DELETEA_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

DELETEA_IN_AGA(X1, .(X2, X3), X4) → DELETEA_IN_AGA(X1, X3, X4)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
DELETEA_IN_AGA(x1, x2, x3)  =  DELETEA_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

DELETEA_IN_AGA(.(X2, X3)) → DELETEA_IN_AGA(X3)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • DELETEA_IN_AGA(.(X2, X3)) → DELETEA_IN_AGA(X3)
    The graph contains the following edges 1 > 1

(20) YES

(21) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U4_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
permcC_in_ga([], []) → permcC_out_ga([], [])
permcC_in_ga(.(X1, .(X2, [])), .(X3, .(X4, []))) → U15_ga(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U15_ga(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → U16_ga(X1, X2, X3, X4, permcC_in_ga(X5, X4))
U16_ga(X1, X2, X3, X4, permcC_out_ga(X5, X4)) → permcC_out_ga(.(X1, .(X2, [])), .(X3, .(X4, [])))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
permcC_in_ga(x1, x2)  =  permcC_in_ga(x1)
permcC_out_ga(x1, x2)  =  permcC_out_ga(x1, x2)
U15_ga(x1, x2, x3, x4, x5)  =  U15_ga(x1, x2, x5)
U16_ga(x1, x2, x3, x4, x5)  =  U16_ga(x1, x2, x3, x5)
PERMC_IN_GA(x1, x2)  =  PERMC_IN_GA(x1)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x5)

We have to consider all (P,R,Pi)-chains

(22) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERMC_IN_GA(.(X1, .(X2, [])), .(X3, .(X4, []))) → U4_GA(X1, X2, X3, X4, deletecB_in_agga(X3, X1, X2, X5))
U4_GA(X1, X2, X3, X4, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5, X4)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X1, X2, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X1, X2, X3, X4) → U14_agga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U14_agga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
deletecA_in_aga(X1, .(X1, X2), X2) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(X1, .(X2, X3), X4) → U13_aga(X1, X2, X3, X4, deletecA_in_aga(X1, X3, X4))
U13_aga(X1, X2, X3, X4, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
[]  =  []
deletecB_in_agga(x1, x2, x3, x4)  =  deletecB_in_agga(x2, x3)
deletecB_out_agga(x1, x2, x3, x4)  =  deletecB_out_agga(x1, x2, x3, x4)
U14_agga(x1, x2, x3, x4, x5)  =  U14_agga(x2, x3, x5)
deletecA_in_aga(x1, x2, x3)  =  deletecA_in_aga(x2)
deletecA_out_aga(x1, x2, x3)  =  deletecA_out_aga(x1, x2, x3)
U13_aga(x1, x2, x3, x4, x5)  =  U13_aga(x2, x3, x5)
PERMC_IN_GA(x1, x2)  =  PERMC_IN_GA(x1)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x5)

We have to consider all (P,R,Pi)-chains

(24) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(25) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PERMC_IN_GA(.(X1, .(X2, []))) → U4_GA(X1, X2, deletecB_in_agga(X1, X2))
U4_GA(X1, X2, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5)

The TRS R consists of the following rules:

deletecB_in_agga(X1, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X2, X3) → U14_agga(X2, X3, deletecA_in_aga(X3))
U14_agga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
deletecA_in_aga(.(X1, X2)) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(.(X2, X3)) → U13_aga(X2, X3, deletecA_in_aga(X3))
U13_aga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)

The set Q consists of the following terms:

deletecB_in_agga(x0, x1)
U14_agga(x0, x1, x2)
deletecA_in_aga(x0)
U13_aga(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(26) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


PERMC_IN_GA(.(X1, .(X2, []))) → U4_GA(X1, X2, deletecB_in_agga(X1, X2))
U4_GA(X1, X2, deletecB_out_agga(X3, X1, X2, X5)) → PERMC_IN_GA(X5)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U4_GA(x1, ..., x3) ) = x3


POL( deletecB_in_agga(x1, x2) ) = x1 + x2 + 2


POL( deletecB_out_agga(x1, ..., x4) ) = x4 + 2


POL( U14_agga(x1, ..., x3) ) = x3 + 2


POL( deletecA_in_aga(x1) ) = x1


POL( .(x1, x2) ) = x1 + x2 + 2


POL( deletecA_out_aga(x1, ..., x3) ) = x1 + x3 + 1


POL( U13_aga(x1, ..., x3) ) = x3 + 2


POL( PERMC_IN_GA(x1) ) = x1 + 1


POL( [] ) = 0



The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

deletecB_in_agga(X1, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X2, X3) → U14_agga(X2, X3, deletecA_in_aga(X3))
deletecA_in_aga(.(X1, X2)) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(.(X2, X3)) → U13_aga(X2, X3, deletecA_in_aga(X3))
U14_agga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
U13_aga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)

(27) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

deletecB_in_agga(X1, X2) → deletecB_out_agga(X1, X1, X2, X2)
deletecB_in_agga(X2, X3) → U14_agga(X2, X3, deletecA_in_aga(X3))
U14_agga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecB_out_agga(X1, X2, X3, X4)
deletecA_in_aga(.(X1, X2)) → deletecA_out_aga(X1, .(X1, X2), X2)
deletecA_in_aga(.(X2, X3)) → U13_aga(X2, X3, deletecA_in_aga(X3))
U13_aga(X2, X3, deletecA_out_aga(X1, X3, X4)) → deletecA_out_aga(X1, .(X2, X3), X4)

The set Q consists of the following terms:

deletecB_in_agga(x0, x1)
U14_agga(x0, x1, x2)
deletecA_in_aga(x0)
U13_aga(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(28) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(29) YES